package net.zjitc.zuoye.qi;

import java.util.ArrayList;
import java.util.Iterator;


/**
 * @author:胡新雨
 * @date：2019/4/2 10:19
 */
public class chongfu {
    public static void main(String[] args) {
        ArrayList  arrayList=new ArrayList();
        arrayList.add("jki");
        arrayList.add("asd");
        arrayList.add("dfg");
        arrayList.add("hello");
        arrayList.add("java");
        arrayList.add("hello");
      for (int i=0;i<arrayList.size();i++){
          System.out.println(arrayList.get(i));

      }
        System.out.println("变化之后：");
        arrayList.remove(1);
        for (int j=0;j<arrayList.size();j++){
            if (arrayList.get(j).equals("hello")){
                arrayList.remove(arrayList.get(j));
            }
            System.out.println(arrayList.get(j));
        }
    }
}
